home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / xcode / globals.inc < prev    next >
Encoding:
Text File  |  1993-09-10  |  9.3 KB  |  299 lines

  1. ;----------------------------------------------------------------------------:
  2. ; SILVERMOON                                                                 :
  3. ;                                                                             :
  4. ; Globals                   (C) John Connors 1993                             :
  5. ;----------------------------------------------------------------------------:
  6.  
  7. ;----------------------------------------------------------------------------:
  8. ;            DATA SEGMENT                                                     :
  9. ;----------------------------------------------------------------------------:
  10.  
  11.  
  12. SEGMENT Data_Segment DWORD PUBLIC USE32 'DATA'
  13. ENDS    Data_Segment
  14.  
  15. ;----------------------------------------------------------------------------:
  16. ;            CODE SEGMENT                                                     :
  17. ;----------------------------------------------------------------------------:
  18.  
  19.  
  20. SEGMENT Code_Segment DWORD PUBLIC USE16 'CODE'
  21. ENDS    Code_Segment
  22.  
  23. ;----------------------------------------------------------------------------:
  24. ;            VIDEO SEGMENT                                         :
  25. ;----------------------------------------------------------------------------:
  26.  
  27. SEGMENT Video_Segment AT 0a000h
  28. ENDS    Video_Segment
  29.  
  30. ;----------------------------------------------------------------------------:
  31. ; Mouse Globals                                                              :
  32. ;----------------------------------------------------------------------------:
  33.     GLOBAL    Install_Mouse:FAR,UnInstall_Mouse:FAR
  34.         
  35. ;----------------------------------------------------------------------------:
  36. ; VGA Globals                                                                 :
  37. ;----------------------------------------------------------------------------:
  38.  
  39.     GLOBAL    Test_Card:NEAR,Unchain:NEAR,Set_VGA_Colour:NEAR
  40.     GLOBAL    Enable_VGA_Bit_Plane:NEAR,Copy_Screen_to_VGA:NEAR
  41.  
  42. ;----------------------------------------------------------------------------:
  43. ; Memory Management Globals                                                  :
  44. ;----------------------------------------------------------------------------:
  45.  
  46.     GLOBAL    Malloc:NEAR,Free:NEAR
  47.     
  48. ;----------------------------------------------------------------------------:
  49. ; file globals                                                                 :
  50. ;----------------------------------------------------------------------------:
  51.  
  52.     GLOBAL Get_File:NEAR,File_Data:BYTE:0fff0h,File_Name_List:WORD
  53.  
  54. ;----------------------------------------------------------------------------:
  55. ; PCX decoding globals                                                         :
  56. ;----------------------------------------------------------------------------:
  57.  
  58.     GLOBAL Set_PCX_Palette:NEAR,Decode_PCX_Screen:NEAR
  59.  
  60. ;----------------------------------------------------------------------------:
  61. ; Fatal error globals                                                         :
  62. ;----------------------------------------------------------------------------:
  63.  
  64.     GLOBAL Fuckup:FAR
  65.  
  66. ;----------------------------------------------------------------------------:
  67. ; Sprite Globals                                                             :
  68. ;----------------------------------------------------------------------------:
  69.  
  70.     GLOBAL    Display_Unclipped_Sprite:NEAR,Erase_Unclipped_Sprite:NEAR
  71.     GLOBAL    Display_Clipped_Sprite:NEAR,Display_Wrapped_Sprite:NEAR
  72.     GLOBAL    Save_Unclipped_Background:NEAR,Display_Unclipped_Block:NEAR
  73.     GLOBAL    Limit_Sprite:NEAR
  74.     GLOBAL    Set_Up_Frame:NEAR,Separate_Sprite_Planes:NEAR
  75.     GLOBAL    Separate_Mask_Planes:NEAR
  76.     GLOBAL    Set_Up_Sprite:NEAR,Reset_Sprite_Data:NEAR
  77.     GLOBAL    Image_Buffer:BYTE:64000
  78.     GLOBAL    Display_Wrapped_Mask:NEAR
  79.     
  80. Sprite_Item_Size = 32
  81. Frame_Item_Size  = 16
  82.     
  83. ;----------------------------------------------------------------------------:
  84. ; VBlank Globals                                                             :
  85. ;----------------------------------------------------------------------------:
  86.  
  87.     GLOBAL    VBlank_Service:FAR
  88.     GLOBAL    Screen_Buffer:BYTE:64000
  89.  
  90. ;----------------------------------------------------------------------------:
  91. ; Scroll Globals                                                             :
  92. ;----------------------------------------------------------------------------:
  93.  
  94.     GLOBAL    Scroll_Left:NEAR,Scroll_Right:NEAR
  95.  
  96. ;----------------------------------------------------------------------------:
  97. ;Boggle Globals                                                              :
  98. ;----------------------------------------------------------------------------:
  99.  
  100.     GLOBAL Update_Boggle:NEAR
  101.      
  102. ;----------------------------------------------------------------------------:
  103. ;Broderick Globals                                                             :
  104. ;----------------------------------------------------------------------------:
  105.  
  106.     GLOBAL Update_Broderick:NEAR
  107.     
  108. ;----------------------------------------------------------------------------:
  109. ; Sword Globals                                                              :
  110. ;----------------------------------------------------------------------------:
  111.  
  112.     GLOBAL Update_Sword:NEAR
  113.  
  114.     GLOBAL Update_Candle:NEAR
  115.     
  116. ;----------------------------------------------------------------------------:
  117. ; Keyboard Globlas                                                             :
  118. ;----------------------------------------------------------------------------:
  119.  
  120.     GLOBAL Check_Keyboard:NEAR,Set_Up_Keyboard:NEAR,Reset_Keyboard:FAR
  121.  
  122. ;----------------------------------------------------------------------------:
  123. ; Sprite Numbers                                                             :
  124. ;----------------------------------------------------------------------------:
  125.  
  126. Boggle_Body_Sprite        EQU 0
  127. Boggle_Head_Sprite        EQU 1
  128. Broderick_Body_Sprite    EQU 2
  129. Broderick_Head_Sprite    EQU 3
  130. Potion_Sprite            EQU 4
  131. Boggle_Score_Sprite     EQU 5
  132. Broderick_Score_Sprite    EQU 6
  133. Flame_Bar_Sprite        EQU 7
  134. Name_Box_Sprite         EQU 8
  135. Count_Box_Sprite        EQU 9
  136. Boggle_Bar_Sprite        EQU 10
  137. Broderick_Bar_Sprite    EQU 11
  138. Boggle_Life_Sprite        EQU 12
  139. Broderick_Life_Sprite    EQU 13
  140. Sword_Sprite            EQU 14
  141. Candle_Sprite            EQU 15
  142. Candle_Mask_Sprite        EQU 16
  143.  
  144. ;----------------------------------------------------------------------------:
  145. ; Screen Layout                                                              :
  146. ;----------------------------------------------------------------------------:
  147.  
  148. Potion_X_Position    EQU 111
  149. Potion_Y_Position    EQU 1
  150.  
  151. Boggle_Score_X_Position EQU 2
  152. Boggle_Score_Y_Position EQU 1
  153.  
  154. Broderick_Score_X_Position EQU 227
  155. Broderick_Score_Y_Position EQU 1
  156.  
  157. Flame_Bar_X_Position EQU 1
  158. Flame_Bar_Y_Position EQU 27
  159.  
  160. Name_Box_X_Position EQU 161
  161. Name_Box_Y_Position EQU 1
  162.  
  163. Count_Box_X_Position EQU 161
  164. Count_Box_Y_Position EQU 14
  165.  
  166. Boggle_Bar_X_Position EQU 30
  167. Boggle_Bar_Y_Position EQU 1
  168.  
  169. Broderick_Bar_X_Position EQU 255
  170. Broderick_Bar_Y_Position EQU 1
  171.  
  172. Boggle_Life_X_Position EQU 95
  173. Boggle_Life_Y_Position EQU 1
  174.  
  175. Broderick_Life_X_Position EQU 213
  176. Broderick_Life_Y_Position EQU 1
  177.  
  178.  
  179. ; coords of first appearance
  180.  
  181. Boggle_Inital_X     EQU 140
  182. Boggle_Inital_Y     EQU 90
  183.  
  184. Broderick_Inital_X EQU 140
  185. Broderick_Inital_Y EQU 102
  186.  
  187. Candle_Inital_X    EQU 124
  188. Candle_Inital_Y    EQU 111
  189.  
  190. Candle_Mask_Inital_X EQU 118
  191. Candle_Mask_Inital_Y EQU 93
  192.  
  193. ; offset of boggle's head from his body! (tweak to avoid headless dragons)
  194.  
  195. Boggle_Head_X_Offset EQU 36
  196. Boggle_Head_Y_Offset EQU 12
  197.  
  198. ;----------------------------------------------------------------------------:
  199. ; Symbols for frames of animation                                             :
  200. ;----------------------------------------------------------------------------:
  201.  
  202. Maximum_Sprites = 32
  203. Maximum_Frames = 100
  204. Maximum_Files = Maximum_Frames
  205.  
  206. Background_Test_File EQU 0
  207. Boggle_Start_File     EQU 1
  208.  
  209. Stop_Potion_File     EQU 6
  210. Boggle_Score_File     EQU 7
  211. Broderick_Score_File EQU 8
  212. Flame_Bar_File         EQU 9
  213. Name_Box_File         EQU 10
  214. Count_Box_File         EQU 11
  215. Boggle_Bar_File      EQU 12
  216. Broderick_Bar_File     EQU 13
  217. Boggle_Life_File     EQU 14
  218. Broderick_Life_File  EQU 15
  219.  
  220. Boggle_Frames         EQU 5
  221. Stop_Potion_Frame     EQU 6
  222. Flame_Bar_Frame      EQU 9
  223. Name_Box_Frame         EQU 10
  224. Count_Box_Frame      EQU 11
  225. Boggle_Bar_Frame     EQU 12
  226. Broderick_Bar_Frame  EQU 13
  227. Boggle_Life_Frame     EQU 14
  228. Broderick_Life_Frame EQU 15
  229. Boggle_Head_Frame     EQU 16
  230. Boggle_Head_Frames     EQU 10                     ; includes smoking and flaming
  231. Boggle_Smoke_Frame     EQU 17
  232. Boggle_Smoke_Frames  EQU 3
  233. Boggle_Flame_Frame     EQU 21
  234. Boggle_Flame_Frames  EQU 6
  235. Broderick_Walk_Frame EQU 56
  236. Broderick_Walk_Frames    EQU 8
  237. Sword_Walk_Frame    EQU 70
  238. Sword_Walk_Frames    EQU 8
  239. Sword_Melt_Frame    EQU 80
  240. Sword_Melt_Frames    EQU 7
  241. Candle_Frame        EQU 90
  242. Candle_Mask_Frame    EQU 91
  243.  
  244. ;----------------------------------------------------------------------------:
  245. ; States of player sprites                                                     :
  246. ;----------------------------------------------------------------------------:
  247.  
  248. ; broderick states
  249.  
  250. Broderick_Walking            EQU 1
  251. Broderick_Ducking            EQU 2
  252. Broderick_Turning            EQU 4
  253. Broderick_Falling_Left        EQU 8
  254. Broderick_Catching_Left     EQU 16
  255. Broderick_Falling_Right     EQU 32
  256. Broderick_Catching_Right    EQU 64
  257.  
  258. ; boggle's state
  259.  
  260. Boggle_Cruising      EQU 0                        ; just flyin' along
  261. Boggle_At_Left_Edge  EQU 1
  262. Boggle_At_Right_Edge EQU 2
  263. Boggle_Smoking         EQU 4
  264. Boggle_Flaming_Left  EQU 8
  265. Boggle_Flaming_Right EQU 16
  266. Boggle_Turning         EQU 32
  267. Boggle_Exploding     EQU 64                 ; oh, dear - hydrogen
  268. Boggle_Loaded         EQU 128                ; boggie has sommat in claws
  269.  
  270. ; sword state
  271.  
  272. Sword_Non_Existent EQU 0
  273. Sword_Walking       EQU 1
  274. Sword_Melting       EQU 2
  275. Sword_Dead           EQU 4
  276. Sword_Dying        EQU 8
  277. Sword_Erasing       EQU 16
  278.  
  279. ; candle states
  280.  
  281. Candle_Non_Existant EQU 0
  282. Candle_On            EQU 1
  283. Candle_Off            EQU 2
  284. Candle_Dying        EQU 4
  285.         
  286. ;----------------------------------------------------------------------------:
  287. ;    Error numbers                                                             :
  288. ;----------------------------------------------------------------------------:
  289.  
  290. File_Fuckup         EQU 0
  291. Image_Space_Fuckup    EQU 1
  292.  
  293. ;----------------------------------------------------------------------------:
  294. ; Key scan stuff                                                             :
  295. ;----------------------------------------------------------------------------:
  296.  
  297. Flip_Boggle_Scan_Code    EQU 0fh                 ; tab key
  298.  
  299.